package com.bean;

/**
 * 作者 ： 暗网
 * 创建时间：2017/2/14
 * 备注：
 */

public class BaseResponse<T> {
	private String flag;  //success 成功;否则表示不成功
	private String info;
	private String time;
	private BaseResponseData<T> data;

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public BaseResponseData<T> getData() {
		return data;
	}

	public void setData(BaseResponseData<T> data) {
		this.data = data;
	}

	public boolean resultSuccess() {
		if ("success".equals (flag)) {
			return true;
		}
		return false;
	}

	@Override
	public String toString() {
		return "BaseResponse{" +
				"flag='" + flag + '\'' +
				", info='" + info + '\'' +
				", time='" + time + '\'' +
				", data=" + data +
				'}';
	}
}
